﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Game.Handlers;

namespace Game
{
    public partial class TrainerCreator : Form
    {
        public TrainerCreator()
        {
            InitializeComponent();
        }

        public string C_Image;
        private int Base_BP;
        private int _apper;
        private int _stren;
        private int _dext;

        private void TrainerCreator_Load(object sender, EventArgs e)
        {
            #region Basic Setup
            BaseStats bs = new BaseStats();
            Game_Images gi = new Game_Images();
            bs.Male();
            bs.Start_BuildPoints("male", 6);
            bx_Age.Text = "6";
            btn_Male.Checked = true;
            bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
            bx_clitsize.Enabled = false;
            bx_breastsize.Enabled = false;
            btn_app_minus.Enabled = false;
            btn_app_minus.Enabled = false;
            btn_int_minus.Enabled = false;
            btn_stam_minus.Enabled = false;
            btn_dex_minus.Enabled = false;
            btn_mana_minus.Enabled = false;
            btn_mana_Plus.Enabled = false;
            btn_str_minus.Enabled = false;
            bx_int.Text = Convert.ToString(bs.intelligance);
            bx_stamina.Text = Convert.ToString(bs.stamina);
            bx_Str.Text = Convert.ToString(bs.strength);
            bx_dex.Text = Convert.ToString(bs.dexterity);
            bx_mana.Text = Convert.ToString(bs.mana);
            TrainerPic.SizeMode = PictureBoxSizeMode.StretchImage;
            bx_apperance.Text = Convert.ToString(bs.apperance);
            bx_yen.Text = Convert.ToString(bs._yen);
            bx_debt.Text = Convert.ToString(bs._debt);
            Base_BP = Convert.ToInt32(bx_BuildPoints.Text);
            Random rnd = new Random();
            //gi.NextImage("Male",gi.Next_Image);
            gi.NextImage("Male", rnd.Next(1, 2));
            TrainerPic.Image = gi.Male;
            bx_SelectImage.Items.Add("Male1");
            bx_SelectImage.Items.Add("Male2");
            #endregion
        }

        #region Button Done - Coninue to Game
        private void btn_Done_Click(object sender, EventArgs e)
        {
            if (bx_CharacterName.Text == "")
            {
                MessageBox.Show("Please Enter a Character Name");
            }
            else
            {
                this.Hide();
                GameForm gf = new GameForm();
                gf.ShowDialog();
            }
        }
        #endregion

        #region Stat Mods for Gender

        #region Female
        private void btn_Fem_CheckedChanged(object sender, EventArgs e)
        {
            BaseStats bs = new BaseStats();
            Game_Images gi = new Game_Images();
            bs.Female();
            bx_breastsize.Enabled = true;
            bx_clitsize.Enabled = true;
            bx_cocksize.Enabled = false;
            bx_int.Text = Convert.ToString(bs.intelligance);
            bx_Str.Text = Convert.ToString(bs.strength);
            bx_stamina.Text = Convert.ToString(bs.stamina);
            bx_apperance.Text = Convert.ToString(bs.apperance);
            bx_yen.Text = Convert.ToString(bs._yen);
            bx_debt.Text = Convert.ToString(bs._debt);
            bx_breastsize.Text = bs.breastsize;
            bx_clitsize.Text = Convert.ToString(bs.clitsize);
            int _age = Convert.ToInt32(bx_Age.Text);
            bs.Start_BuildPoints("female", _age);
            bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
            Base_BP = Convert.ToInt32(bx_BuildPoints.Text);
            Random rnd = new Random();
           // gi.NextImage("Female", gi.Next_Image);
            gi.NextImage("Female", rnd.Next(1, 2));
            TrainerPic.Image = gi.Female;
            bx_SelectImage.Items.Clear();
            bx_SelectImage.Items.Add("Female1");
            bx_SelectImage.Items.Add("Female2");
            //Reset Race, Alignment and Class Selection after gender change.
            bx_Race.Text = null;
            bx_Class.Text = null;
            bx_Align.Text = null;
            bx_Class.Enabled = false;
            bx_Align.Enabled = false;
            bx_Race.Enabled = true;
            btn_app_minus.Enabled = false;
            btn_app_plus.Enabled = false;
            btn_stam_minus.Enabled = false;
            btn_stam_plus.Enabled = false;
            btn_str_plus.Enabled = false;
            btn_str_minus.Enabled = false;
            btn_mana_Plus.Enabled = false;
            btn_mana_minus.Enabled = false;
            btn_int_plus.Enabled = false;
            btn_int_minus.Enabled = false;
            btn_dex_plus.Enabled = false;
            btn_dex_minus.Enabled = false;
        }
        #endregion

        #region Male
        private void btn_Male_CheckedChanged(object sender, EventArgs e)
        {
            BaseStats bs = new BaseStats();
            Game_Images gi = new Game_Images();
            bs.Male();
            bx_breastsize.Enabled = false;
            bx_cocksize.Enabled = true;
            bx_clitsize.Enabled = false;
            bx_int.Text = Convert.ToString(bs.intelligance);
            bx_Str.Text = Convert.ToString(bs.strength);
            bx_stamina.Text = Convert.ToString(bs.stamina);
            bx_apperance.Text = Convert.ToString(bs.apperance);
            bx_yen.Text = Convert.ToString(bs._yen);
            bx_debt.Text = Convert.ToString(bs._debt);
            bx_breastsize.Text = bs.breastsize;
            bx_clitsize.Text = Convert.ToString(bs.clitsize);
            int _age = Convert.ToInt32(bx_Age.Text);
            bs.Start_BuildPoints("male", _age);
            bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
            Base_BP = Convert.ToInt32(bx_BuildPoints.Text);
            Random rnd = new Random();
            //gi.NextImage("Male", gi.Next_Image);
            gi.NextImage("Male", rnd.Next(1, 2));
            TrainerPic.Image = gi.Male;
            bx_SelectImage.Items.Clear();
            bx_SelectImage.Items.Add("Male1");
            bx_SelectImage.Items.Add("Male2");
            //Reset Race, Alignment and Class Selection after gender change.
            bx_Race.Text = null;
            bx_Class.Text = null;
            bx_Align.Text = null;
            bx_Class.Enabled = false;
            bx_Align.Enabled = false;
            bx_Race.Enabled = true;
            btn_app_minus.Enabled = false;
            btn_app_plus.Enabled = false;
            btn_stam_minus.Enabled = false;
            btn_stam_plus.Enabled = false;
            btn_str_plus.Enabled = false;
            btn_str_minus.Enabled = false;
            btn_mana_Plus.Enabled = false;
            btn_mana_minus.Enabled = false;
            btn_int_plus.Enabled = false;
            btn_int_minus.Enabled = false;
            btn_dex_plus.Enabled = false;
            btn_dex_minus.Enabled = false;
        }
        #endregion

        #region Futanari
        private void btn_Fut_CheckedChanged(object sender, EventArgs e)
        {
            BaseStats bs = new BaseStats();
            Game_Images gi = new Game_Images();
            bs.Futanari();
            bx_breastsize.Enabled = true;
            bx_clitsize.Enabled = false;
            bx_cocksize.Enabled = true;
            bx_int.Text = Convert.ToString(bs.intelligance);
            bx_Str.Text = Convert.ToString(bs.strength);
            bx_stamina.Text = Convert.ToString(bs.stamina);
            bx_apperance.Text = Convert.ToString(bs.apperance);
            bx_yen.Text = Convert.ToString(bs._yen);
            bx_debt.Text = Convert.ToString(bs._debt);
            bx_breastsize.Text = bs.breastsize;
            bx_clitsize.Text = Convert.ToString(bs.clitsize);
            int _age = Convert.ToInt32(bx_Age.Text);
            bs.Start_BuildPoints("futanari", _age);
            bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
            Base_BP = Convert.ToInt32(bx_BuildPoints.Text);
            Random rnd = new Random();
            gi.NextImage("Futanari", rnd.Next(1, 5));
            TrainerPic.Image = gi.Futa;
            bx_SelectImage.Items.Clear();
            bx_SelectImage.Items.Add("Futa1");
            bx_SelectImage.Items.Add("Futa2");
            bx_SelectImage.Items.Add("Futa3");
            bx_SelectImage.Items.Add("Futa4");
            bx_SelectImage.Items.Add("Futa5");
            //Reset Race, Alignment and Class Selection after gender change.
            bx_Race.Text = null;
            bx_Class.Text = null;
            bx_Align.Text = null;
            bx_Class.Enabled = false;
            bx_Align.Enabled = false;
            bx_Race.Enabled = true;
            btn_app_minus.Enabled = false;
            btn_app_plus.Enabled = false;
            btn_stam_minus.Enabled = false;
            btn_stam_plus.Enabled = false;
            btn_str_plus.Enabled = false;
            btn_str_minus.Enabled = false;
            btn_mana_Plus.Enabled = false;
            btn_mana_minus.Enabled = false;
            btn_int_plus.Enabled = false;
            btn_int_minus.Enabled = false;
            btn_dex_plus.Enabled = false;
            btn_dex_minus.Enabled = false;
        }
        #endregion
        #endregion

        #region Add Subtract Stat Points

        #region Strength
        #region Plus
        private void btn_str_plus_Click(object sender, EventArgs e)
        {
            //Spending Points is based on Class
            //Heres a lis of Classes
            //Human
            //Elf
            //Neko
            //Goo
            //Angel
            //Demon
            btn_str_minus.Enabled = true;
            int int_str = Convert.ToInt32(bx_Str.Text);
            int bp_left = Convert.ToInt32(bx_BuildPoints.Text);
            bx_Str.Text = Convert.ToString(int_str + 1);
            if (int_str == 17)
            {
                btn_str_plus.Enabled = false;
            }
            else
            {
                if (bp_left == 0)
                {
                    MessageBox.Show("No More Build Points");
                    btn_str_plus.Enabled = false;
                }
                else
                {
                    if (bx_Class.Text == "Warrior")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 5);
                    }
                    else if (bx_Class.Text == "Rouge")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 10);
                    }
                    else if (bx_Class.Text == "Masocist")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 8);
                    }
                    else if (bx_Class.Text == "Slave")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 20);
                    }
                    else if (bx_Class.Text == "Mage")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 15);
                    }
                    else if (bx_Class.Text == "Summoner")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 15);
                    }
                }
            }
        }
        #endregion
        #region Minus
        private void btn_str_minus_Click(object sender, EventArgs e)
        {
            //Heres a lis of Races.
            //Human
            //Elf
            //Neko
            //Goo
            //Angel
            //Demon
            btn_str_plus.Enabled = true;
            int int_str = Convert.ToInt32(bx_Str.Text);
            int bp_left = Convert.ToInt32(bx_BuildPoints.Text);
            bx_Str.Text = Convert.ToString(int_str - 1);
            if (bp_left == Base_BP)
            {
                btn_str_minus.Enabled = false;
            }
            else
            {
                if (bx_Class.Text == "Warrior")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 5);
                }
                else if (bx_Class.Text == "Rouge")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 10);
                }
                else if (bx_Class.Text == "Masocist")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 8);
                }
                else if (bx_Class.Text == "Slave")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 20);
                }
                else if (bx_Class.Text == "Mage")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 15);
                }
                else if (bx_Class.Text == "Summoner")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 15);
                }
            }
        }
        #endregion
        #endregion

        #region Intelligance

        #region Plus
        private void btn_int_plus_Click(object sender, EventArgs e)
        {
            btn_int_minus.Enabled = true;
            int int_int = Convert.ToInt32(bx_int.Text);
            int bp_left = Convert.ToInt32(bx_BuildPoints.Text);
            bx_int.Text = Convert.ToString(int_int + 1);
            if (int_int == 17)
            {
                btn_int_plus.Enabled = false;
            }
            else
            {
                if (bp_left == 0)
                {
                    MessageBox.Show("No More Build Points");
                    btn_int_plus.Enabled = false;
                }
                else
                {
                    if (bx_Class.Text == "Warrior")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 5);
                    }
                    else if (bx_Class.Text == "Rouge")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 10);
                    }
                    else if (bx_Class.Text == "Masocist")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 8);
                    }
                    else if (bx_Class.Text == "Slave")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 20);
                    }
                    else if (bx_Class.Text == "Mage")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 15);
                    }
                    else if (bx_Class.Text == "Summoner")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 15);
                    }
                }
            }
        }
        #endregion

        #region Minus
        private void btn_int_minus_Click(object sender, EventArgs e)
        {
            //Heres a lis of Races.
            //Human
            //Elf
            //Neko
            //Goo
            //Angel
            //Demon
            btn_str_plus.Enabled = true;
            int int_int = Convert.ToInt32(bx_int.Text);
            int bp_left = Convert.ToInt32(bx_BuildPoints.Text);
            bx_int.Text = Convert.ToString(int_int - 1);
            if (bp_left == Base_BP)
            {
                btn_int_minus.Enabled = false;
            }
            else
            {
                if (bx_Class.Text == "Warrior")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 5);
                }
                else if (bx_Class.Text == "Rouge")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 10);
                }
                else if (bx_Class.Text == "Masocist")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 8);
                }
                else if (bx_Class.Text == "Slave")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 20);
                }
                else if (bx_Class.Text == "Mage")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 15);
                }
                else if (bx_Class.Text == "Summoner")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 15);
                }
            }
        }
        #endregion

        #endregion

        #region Apperance

        #region Plus
        private void btn_app_plus_Click(object sender, EventArgs e)
        {
            btn_app_minus.Enabled = true;
            int int_app = Convert.ToInt32(bx_apperance.Text);
            int bp_left = Convert.ToInt32(bx_BuildPoints.Text);
            bx_apperance.Text = Convert.ToString(int_app + 1);
            if (int_app == 17)
            {
                btn_app_plus.Enabled = false;
            }
            else
            {
                if (bp_left == 0)
                {
                    MessageBox.Show("No More Build Points");
                    btn_app_plus.Enabled = false;
                }
                else
                {
                    if (bx_Class.Text == "Warrior")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 5);
                    }
                    else if (bx_Class.Text == "Rouge")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 10);
                    }
                    else if (bx_Class.Text == "Masocist")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 8);
                    }
                    else if (bx_Class.Text == "Slave")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 20);
                    }
                    else if (bx_Class.Text == "Mage")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 15);
                    }
                    else if (bx_Class.Text == "Summoner")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 15);
                    }
                }
            }
        }
        #endregion

        #region Minus
        private void btn_app_minus_Click(object sender, EventArgs e)
        {
            //Heres a lis of Races.
            //Human
            //Elf
            //Neko
            //Goo
            //Angel
            //Demon
            btn_app_plus.Enabled = true;
            int int_app = Convert.ToInt32(bx_apperance.Text);
            int bp_left = Convert.ToInt32(bx_BuildPoints.Text);
            bx_apperance.Text = Convert.ToString(int_app - 1);
            if (bp_left == Base_BP)
            {
                btn_app_minus.Enabled = false;
            }
            else
            {
                if (bx_Class.Text == "Warrior")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 5);
                }
                else if (bx_Class.Text == "Rouge")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 10);
                }
                else if (bx_Class.Text == "Masocist")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 8);
                }
                else if (bx_Class.Text == "Slave")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 20);
                }
                else if (bx_Class.Text == "Mage")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 15);
                }
                else if (bx_Class.Text == "Summoner")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 15);
                }
            }
        }
        #endregion
        #endregion

        #region Stamina

        #region Plus
        private void btn_stam_plus_Click(object sender, EventArgs e)
        {
            btn_stam_minus.Enabled = true;
            int int_stam = Convert.ToInt32(bx_stamina.Text);
            int bp_left = Convert.ToInt32(bx_BuildPoints.Text);
            bx_stamina.Text = Convert.ToString(int_stam + 1);
            if (int_stam == 17)
            {
                btn_app_plus.Enabled = false;
            }
            else
            {
                if (bp_left == 0)
                {
                    MessageBox.Show("No More Build Points");
                    btn_stam_plus.Enabled = false;
                }
                else
                {
                    if (bx_Class.Text == "Warrior")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 5);
                    }
                    else if (bx_Class.Text == "Rouge")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 10);
                    }
                    else if (bx_Class.Text == "Masocist")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 8);
                    }
                    else if (bx_Class.Text == "Slave")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 20);
                    }
                    else if (bx_Class.Text == "Mage")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 15);
                    }
                    else if (bx_Class.Text == "Summoner")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 15);
                    }
                }
            }
        }
        #endregion

        #region Minus
        private void btn_stam_minus_Click(object sender, EventArgs e)
        {
            //Heres a lis of Races.
            //Human
            //Elf
            //Neko
            //Goo
            //Angel
            //Demon
            btn_stam_plus.Enabled = true;
            int int_stam = Convert.ToInt32(bx_stamina.Text);
            int bp_left = Convert.ToInt32(bx_BuildPoints.Text);
            bx_stamina.Text = Convert.ToString(int_stam - 1);
            if (bp_left == Base_BP)
            {
                btn_stam_minus.Enabled = false;
            }
            else
            {
                if (bx_Class.Text == "Warrior")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 5);
                }
                else if (bx_Class.Text == "Rouge")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 10);
                }
                else if (bx_Class.Text == "Masocist")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 8);
                }
                else if (bx_Class.Text == "Slave")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 20);
                }
                else if (bx_Class.Text == "Mage")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 15);
                }
                else if (bx_Class.Text == "Summoner")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 15);
                }
            }
        }
        #endregion
        #endregion

        #region Dexterity

        #region Plus
        private void btn_dex_plus_Click(object sender, EventArgs e)
        {
            btn_dex_minus.Enabled = true;
            int int_dex = Convert.ToInt32(bx_dex.Text);
            int bp_left = Convert.ToInt32(bx_BuildPoints.Text);
            bx_dex.Text = Convert.ToString(int_dex + 1);
            if (int_dex == 17)
            {
                btn_dex_plus.Enabled = false;
            }
            else
            {
                if (bp_left == 0)
                {
                    MessageBox.Show("No More Build Points");
                    btn_dex_plus.Enabled = false;
                }
                else
                {
                    if (bx_Class.Text == "Warrior")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 5);
                    }
                    else if (bx_Class.Text == "Rouge")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 10);
                    }
                    else if (bx_Class.Text == "Masocist")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 8);
                    }
                    else if (bx_Class.Text == "Slave")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 20);
                    }
                    else if (bx_Class.Text == "Mage")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 15);
                    }
                    else if (bx_Class.Text == "Summoner")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 15);
                    }
                }
            }
        }
        #endregion

        #region Minus
        private void btn_dex_minus_Click(object sender, EventArgs e)
        {
            //Heres a lis of Races.
            //Human
            //Elf
            //Neko
            //Goo
            //Angel
            //Demon
            btn_dex_plus.Enabled = true;
            int int_dex = Convert.ToInt32(bx_dex.Text);
            int bp_left = Convert.ToInt32(bx_BuildPoints.Text);
            bx_dex.Text = Convert.ToString(int_dex - 1);
            if (bp_left == Base_BP)
            {
                btn_dex_minus.Enabled = false;
            }
            else
            {
                if (bx_Class.Text == "Warrior")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 5);
                }
                else if (bx_Class.Text == "Rouge")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 10);
                }
                else if (bx_Class.Text == "Masocist")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 8);
                }
                else if (bx_Class.Text == "Slave")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 20);
                }
                else if (bx_Class.Text == "Mage")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 15);
                }
                else if (bx_Class.Text == "Summoner")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 15);
                }
            }
        }
        #endregion
        #endregion

        #region Mana
        private void btn_mana_Plus_Click(object sender, EventArgs e)
        {
            btn_mana_minus.Enabled = true;
            int int_mana = Convert.ToInt32(bx_mana.Text);
            int bp_left = Convert.ToInt32(bx_BuildPoints.Text);
            bx_mana.Text = Convert.ToString(int_mana + 1);
            if (int_mana == 17)
            {
                btn_mana_Plus.Enabled = false;
            }
            else
            {
                if (bp_left == 0)
                {
                    MessageBox.Show("No More Build Points");
                    btn_mana_Plus.Enabled = false;
                }
                else
                {
                    if (bx_Class.Text == "Warrior")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 5);
                    }
                    else if (bx_Class.Text == "Rouge")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 10);
                    }
                    else if (bx_Class.Text == "Masocist")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 8);
                    }
                    else if (bx_Class.Text == "Slave")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 20);
                    }
                    else if (bx_Class.Text == "Mage")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 15);
                    }
                    else if (bx_Class.Text == "Summoner")
                    {
                        bx_BuildPoints.Text = Convert.ToString(bp_left - 15);
                    }
                }
            }
        }

        #region Minus
        private void btn_mana_minus_Click(object sender, EventArgs e)
        {
            //Heres a lis of Races.
            //Human
            //Elf
            //Neko
            //Goo
            //Angel
            //Demon
            btn_mana_Plus.Enabled = true;
            int int_mana = Convert.ToInt32(bx_mana.Text);
            int bp_left = Convert.ToInt32(bx_BuildPoints.Text);
            bx_mana.Text = Convert.ToString(int_mana - 1);
            if (bp_left == Base_BP)
            {
                btn_mana_minus.Enabled = false;
            }
            else
            {
                if (bx_Class.Text == "Warrior")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 5);
                }
                else if (bx_Class.Text == "Rouge")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 10);
                }
                else if (bx_Class.Text == "Masocist")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 8);
                }
                else if (bx_Class.Text == "Slave")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 20);
                }
                else if (bx_Class.Text == "Mage")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 15);
                }
                else if (bx_Class.Text == "Summoner")
                {
                    bx_BuildPoints.Text = Convert.ToString(bp_left + 15);
                }
            }
        }
        #endregion
        #endregion

        #endregion

        #region Age Change for Build Point Bonus
        private void bx_Age_SelectedIndexChanged(object sender, EventArgs e)
        {
            BaseStats bs = new BaseStats();

            int _age = Convert.ToInt32(bx_Age.Text);

            #region Ages 6 thru 12
            if (_age <= 12)
            {
                if (btn_Male.Checked == true)
                {
                    bs.Male();
                    _apper = bs.apperance;
                    _stren = bs.strength;
                    _dext = bs.dexterity;
                }
                else if (btn_Fem.Checked == true)
                {
                    bs.Female();
                    _apper = bs.apperance;
                    _stren = bs.strength;
                    _dext = bs.dexterity;
                }
                else if (btn_Fut.Checked == true)
                {
                    bs.Futanari();
                    _apper = bs.apperance;
                    _stren = bs.strength;
                    _dext = bs.dexterity;
                }

                int apper = _apper + 4;
                int stren = _stren - 2;
                int dext = _dext - 2;
                bx_apperance.Text = Convert.ToString(apper);
                bx_Str.Text = Convert.ToString(stren);
                bx_dex.Text = Convert.ToString(dext);

                if (btn_Male.Checked == true)
                {
                   bs.Start_BuildPoints("male", _age);
                   bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                    
                }
                else if (btn_Fem.Checked == true)
                {
                    bs.Start_BuildPoints("female", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
                else if (btn_Fut.Checked == true)
                {
                    bs.Start_BuildPoints("futanari", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
            }
            #endregion
            #region Age 13 tur 15
            else if (_age == 13)
            {
                if (btn_Male.Checked == true)
                {
                    bs.Male();
                    _apper = bs.apperance;
                    _stren = bs.strength;
                    _dext = bs.dexterity;
                }
                else if (btn_Fem.Checked == true)
                {
                    bs.Female();
                    _apper = bs.apperance;
                    _stren = bs.strength;
                    _dext = bs.dexterity;
                }
                else if (btn_Fut.Checked == true)
                {
                    bs.Futanari();
                    _apper = bs.apperance;
                    _stren = bs.strength;
                    _dext = bs.dexterity;
                }

                int apper = _apper + 2;
                int stren = _stren - 1;
                int dext = _dext - 1;
                bx_apperance.Text = Convert.ToString(apper);
                bx_Str.Text = Convert.ToString(stren);
                bx_dex.Text = Convert.ToString(dext);
                if (btn_Male.Checked == true)
                {
                    bs.Start_BuildPoints("male", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
                else if (btn_Fem.Checked == true)
                {
                    bs.Start_BuildPoints("female", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
                else if (btn_Fut.Checked == true)
                {
                    bs.Start_BuildPoints("futanari", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
            }
            else if (_age == 14)
            {
                int apper = _apper + 2;
                int stren = _stren - 1;
                int dext = _dext - 1;
                bx_apperance.Text = Convert.ToString(apper);
                bx_Str.Text = Convert.ToString(stren);
                bx_dex.Text = Convert.ToString(dext);
                if (btn_Male.Checked == true)
                {
                    bs.Start_BuildPoints("male", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
                else if (btn_Fem.Checked == true)
                {
                    bs.Start_BuildPoints("female", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
                else if (btn_Fut.Checked == true)
                {
                    bs.Start_BuildPoints("futanari", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
            }
            else if (_age == 15)
            {
                int apper = _apper + 2;
                int stren = _stren - 1;
                int dext = _dext - 1;
                bx_apperance.Text = Convert.ToString(apper);
                bx_Str.Text = Convert.ToString(stren);
                bx_dex.Text = Convert.ToString(dext);
                if (btn_Male.Checked == true)
                {
                    bs.Start_BuildPoints("male", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
                else if (btn_Fem.Checked == true)
                {
                    bs.Start_BuildPoints("female", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
                else if (btn_Fut.Checked == true)
                {
                    bs.Start_BuildPoints("futanari", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
            }
            #endregion
            #region Ages 16 thru 30
            else if (_age <= 16)
            {
                if (btn_Male.Checked == true)
                {
                    bs.Male();
                    _apper = bs.apperance;
                    _stren = bs.strength;
                    _dext = bs.dexterity;
                }
                else if (btn_Fem.Checked == true)
                {
                    bs.Female();
                    _apper = bs.apperance;
                    _stren = bs.strength;
                    _dext = bs.dexterity;
                }
                else if (btn_Fut.Checked == true)
                {
                    bs.Futanari();
                    _apper = bs.apperance;
                    _stren = bs.strength;
                    _dext = bs.dexterity;
                }

                int apper = _apper - 2;
                int stren = _stren + 4;
                int dext = _dext + 2;
                bx_apperance.Text = Convert.ToString(apper);
                bx_Str.Text = Convert.ToString(stren);
                bx_dex.Text = Convert.ToString(dext);
                if (btn_Male.Checked == true)
                {
                    bs.Start_BuildPoints("male", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
                else if (btn_Fem.Checked == true)
                {
                    bs.Start_BuildPoints("female", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
                else if (btn_Fut.Checked == true)
                {
                    bs.Start_BuildPoints("futanari", _age);
                    bx_BuildPoints.Text = Convert.ToString(bs._basepoints);
                }
            }
            #endregion
        }
        #endregion

        #region Class Change for Stats Mods
        private void bx_Class_SelectedIndexChanged(object sender, EventArgs e)
        {
            #region Enable Stat Change for Plus after Class is selected
            btn_str_plus.Enabled = true;
            btn_stam_plus.Enabled = true;
            btn_app_plus.Enabled = true;
            btn_dex_plus.Enabled = true;
            btn_int_plus.Enabled = true;
            bx_Advantages.Enabled = true;
            #endregion

            if (bx_Class.Text == "Mage")
            {
                btn_mana_Plus.Enabled = true;
                if (bx_Align.Text == "Nutral")
                {
                    bx_mana.Text = "5";
                }
                else if (bx_Align.Text == "Submissive")
                {
                    bx_mana.Text = "3";
                }
            }
            else if (bx_Class.Text == "Summoner")
            {
                btn_mana_Plus.Enabled = true;
                bx_mana.Text = "8";
            }
            else
            {
                btn_mana_Plus.Enabled = false;
                bx_mana.Text = " ";
            }
        }
        #endregion

        #region Alignment on Classes
        private void bx_Align_SelectedIndexChanged(object sender, EventArgs e)
        {
            //Alignments:
            //Dominate
            //Nutral
            //Submissive

            //Enable Class after an Alignment is Selected
            bx_Class.Enabled = true;
            Random rnd = new Random();
            //The rest of the Class selection code here -->    
            bx_Class.Enabled = true;
            if (bx_Align.Text == "Dominate")
            {
                bx_Class.Items.Clear();
                bx_Class.Items.Add("Warrior");
                bx_Class.Items.Add("Masocist");
                bx_Class.Items.Add("Summoner");
                //Debt to Alignment Ratio
                int align_debt = Convert.ToInt32(bx_debt.Text);
                bx_debt.Text = Convert.ToString(align_debt - rnd.Next(100, 1000));
                
            }
            else if (bx_Align.Text == "Nutral")
            {
                bx_Class.Items.Clear();
                bx_Class.Items.Add("Warrior");
                bx_Class.Items.Add("Rouge");
                bx_Class.Items.Add("Mage");
                //Debt to Alignment Ratio
                int align_debt = Convert.ToInt32(bx_debt.Text);
                bx_debt.Text = Convert.ToString(align_debt - rnd.Next(100, 500));
            }
            else if (bx_Align.Text == "Submissive")
            {
                bx_Class.Items.Clear();
                bx_Class.Items.Add("Warrior");
                bx_Class.Items.Add("Slave");
                bx_Class.Items.Add("Mage");
                //Debt to Alignment Ratio
                int align_debt = Convert.ToInt32(bx_debt.Text);
                bx_debt.Text = Convert.ToString(align_debt + rnd.Next(1000, 4000));
                //Submissives start with no Yen
                bx_yen.Text = "0";
            }
        }
        #endregion

        #region Race Changes.
        private void bx_Race_SelectedIndexChanged(object sender, EventArgs e)
        {
            //Races:
            //Human
            //Elf
            //Neko
            //Goo
            //Angel
            //Demon

            //Enables Allignment selection after Race Selection.
            bx_Align.Enabled = true;
            Races rc = new Races();
            //The rest of the Race code here -->
            #region Human
            if (bx_Race.Text == "Human")
            {
                rc.Human(Convert.ToInt32(bx_BuildPoints.Text), Convert.ToInt32(bx_Str.Text), Convert.ToInt32(bx_stamina.Text), Convert.ToInt32(bx_dex.Text), Convert.ToInt32(bx_apperance.Text),Convert.ToInt32(bx_mana.Text), Convert.ToInt32(bx_int.Text));

                bx_BuildPoints.Text = Convert.ToString(rc.new_buildpoints);
                bx_Str.Text = Convert.ToString(rc.bonus_str);
                bx_dex.Text = Convert.ToString(rc.bonus_dex);
                bx_int.Text = Convert.ToString(rc.bonus_int);
                bx_stamina.Text = Convert.ToString(rc.bonus_stam);
                bx_apperance.Text = Convert.ToString(rc.bonus_app);
                
                bx_Align.Enabled = true;
            }
            #endregion
            if (bx_Race.Text == "Elf")
            {

            }


        }
        #endregion

        #region Spell Selection
        private void bx_Spells_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
        #endregion

        #region Select Image for Character
        private void bx_SelectImage_SelectedIndexChanged(object sender, EventArgs e)
        {
            Game_Images gi = new Game_Images();
            if (bx_SelectImage.Text == "Male1")
            {
                gi.NextImage("Male", 1);
                TrainerPic.Image = gi.Male;
            }
            else if (bx_SelectImage.Text == "Male2")
            {
                gi.NextImage("Male", 2);
                TrainerPic.Image = gi.Male;
            }
            else if (bx_SelectImage.Text == "Female1")
            {
                gi.NextImage("Female", 1);
                TrainerPic.Image = gi.Female;
            }
            else if (bx_SelectImage.Text == "Female2")
            {
                gi.NextImage("Female", 2);
                TrainerPic.Image = gi.Female;
            }
            else if (bx_SelectImage.Text == "Futa1")
            {
                gi.NextImage("Futanari", 1);
                TrainerPic.Image = gi.Futa;
            }
            else if (bx_SelectImage.Text == "Futa2")
            {
                gi.NextImage("Futanari", 2);
                TrainerPic.Image = gi.Futa;
            }
            else if (bx_SelectImage.Text == "Futa3")
            {
                gi.NextImage("Futanari", 3);
                TrainerPic.Image = gi.Futa;
            }
            else if (bx_SelectImage.Text == "Futa4")
            {
                gi.NextImage("Futanari", 4);
                TrainerPic.Image = gi.Futa;
            }
            else if (bx_SelectImage.Text == "Futa5")
            {
                gi.NextImage("Futanari", 5);
                TrainerPic.Image = gi.Futa;
            }
        }
        #endregion

        private void bx_Homes_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }
}
